package com.cj.mobile.iabp.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 找铅牛和资质贷共用一个类
 */
public class BankCardInfo implements Parcelable {
    public BankCardInfo() {
    }

    public BankCardInfo(String bankName, String cardholder, String bankCardNo, String bankLogoPath, String bankBanchName, String bankCardTypeName, int isDefault) {
        this.bankName = bankName;
        this.cardholder = cardholder;
        this.bankCardNo = bankCardNo;
        this.bankLogoPath = bankLogoPath;
        this.bankBanchName = bankBanchName;
        this.bankCardTypeName = bankCardTypeName;
        this.defaultType = isDefault;
    }

    /**
     * bankName : 中国工商银行
     * cardholder : 张三
     * bankCardNo : **** **** **** 6666 6666
     * bankLogoPath : http://*.png
     * bankBanchName : 深圳分行
     * bankCardTypeName : 储蓄卡
     */

    // id
    private int id;
    private int bankId;
    // 绑定id
    private String bId;
    // 银行卡名称
    private String bankName;
    // 用户名
    private String cardholder;
    // 联系电话
    private String cardholderPhone;
    // 账号后8位（其余隐藏）
    private String bankCardNo;
    // 银行Logo(bankLogo)
    private String bankLogoPath;
    // 开户行
    private String bankBanchName;
    // 银行卡类型（1：储蓄卡，2：信用卡）
    private int bankCardType;
    // 银行卡类型
    private String bankCardTypeName;
    // 默认收付款（默认收付款：1：默认收款，2：默认付款，3：默认收/付款，4：无）
    private int defaultType;
    // 状态id：1待审核、2审核中、3已退回、4使用中、9已删除
    private int statusId;
    // 状态
    private String statusName;
    // 身份证照片
    private String cardholderIdCard;
    private String cardholderIdCardScale;
    // 银行卡照片
    private String bankCardPhoto;
    private String bankCardPhotoScale;
    // 账户类型（1：公司基本账户，2：收付款账户）
    private int usageType;
    // 收付款类型（1：收款，2：付款，3：收/付款(包含认证)，4：仅认证）
    private int paymentType;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getBankId() {
        return bankId;
    }

    public void setBankId(int bankId) {
        this.bankId = bankId;
    }

    public String getbId() {
        return bId;
    }

    public void setbId(String bId) {
        this.bId = bId;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getCardholder() {
        return cardholder;
    }

    public void setCardholder(String cardholder) {
        this.cardholder = cardholder;
    }

    public String getCardholderPhone() {
        return cardholderPhone;
    }

    public void setCardholderPhone(String cardholderPhone) {
        this.cardholderPhone = cardholderPhone;
    }

    public String getBankCardNo() {
        return bankCardNo;
    }

    public void setBankCardNo(String bankCardNo) {
        this.bankCardNo = bankCardNo;
    }

    public String getBankLogoPath() {
        return bankLogoPath;
    }

    public void setBankLogoPath(String bankLogoPath) {
        this.bankLogoPath = bankLogoPath;
    }

    public String getBankBanchName() {
        return bankBanchName;
    }

    public void setBankBanchName(String bankBanchName) {
        this.bankBanchName = bankBanchName;
    }

    public int getBankCardType() {
        return bankCardType;
    }

    public void setBankCardType(int bankCardType) {
        this.bankCardType = bankCardType;
    }

    public String getBankCardTypeName() {
        return bankCardTypeName;
    }

    public void setBankCardTypeName(String bankCardTypeName) {
        this.bankCardTypeName = bankCardTypeName;
    }

    public int getDefaultType() {
        return defaultType;
    }

    public void setDefaultType(int defaultType) {
        this.defaultType = defaultType;
    }

    public int getStatusId() {
        return statusId;
    }

    public void setStatusId(int statusId) {
        this.statusId = statusId;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String getCardholderIdCard() {
        return cardholderIdCard;
    }

    public void setCardholderIdCard(String cardholderIdCard) {
        this.cardholderIdCard = cardholderIdCard;
    }

    public String getCardholderIdCardScale() {
        return cardholderIdCardScale;
    }

    public void setCardholderIdCardScale(String cardholderIdCardScale) {
        this.cardholderIdCardScale = cardholderIdCardScale;
    }

    public String getBankCardPhoto() {
        return bankCardPhoto;
    }

    public void setBankCardPhoto(String bankCardPhoto) {
        this.bankCardPhoto = bankCardPhoto;
    }

    public String getBankCardPhotoScale() {
        return bankCardPhotoScale;
    }

    public void setBankCardPhotoScale(String bankCardPhotoScale) {
        this.bankCardPhotoScale = bankCardPhotoScale;
    }

    public int getUsageType() {
        return usageType;
    }

    public void setUsageType(int usageType) {
        this.usageType = usageType;
    }

    public int getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(int paymentType) {
        this.paymentType = paymentType;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.bankId);
        dest.writeString(this.bId);
        dest.writeString(this.bankName);
        dest.writeString(this.cardholder);
        dest.writeString(this.cardholderPhone);
        dest.writeString(this.bankCardNo);
        dest.writeString(this.bankLogoPath);
        dest.writeString(this.bankBanchName);
        dest.writeInt(this.bankCardType);
        dest.writeString(this.bankCardTypeName);
        dest.writeInt(this.defaultType);
        dest.writeInt(this.statusId);
        dest.writeString(this.statusName);
        dest.writeString(this.cardholderIdCard);
        dest.writeString(this.cardholderIdCardScale);
        dest.writeString(this.bankCardPhoto);
        dest.writeString(this.bankCardPhotoScale);
        dest.writeInt(this.usageType);
        dest.writeInt(this.paymentType);
    }

    public void readFromParcel(Parcel source) {
        this.id = source.readInt();
        this.bankId = source.readInt();
        this.bId = source.readString();
        this.bankName = source.readString();
        this.cardholder = source.readString();
        this.cardholderPhone = source.readString();
        this.bankCardNo = source.readString();
        this.bankLogoPath = source.readString();
        this.bankBanchName = source.readString();
        this.bankCardType = source.readInt();
        this.bankCardTypeName = source.readString();
        this.defaultType = source.readInt();
        this.statusId = source.readInt();
        this.statusName = source.readString();
        this.cardholderIdCard = source.readString();
        this.cardholderIdCardScale = source.readString();
        this.bankCardPhoto = source.readString();
        this.bankCardPhotoScale = source.readString();
        this.usageType = source.readInt();
        this.paymentType = source.readInt();
    }

    protected BankCardInfo(Parcel in) {
        this.id = in.readInt();
        this.bankId = in.readInt();
        this.bId = in.readString();
        this.bankName = in.readString();
        this.cardholder = in.readString();
        this.cardholderPhone = in.readString();
        this.bankCardNo = in.readString();
        this.bankLogoPath = in.readString();
        this.bankBanchName = in.readString();
        this.bankCardType = in.readInt();
        this.bankCardTypeName = in.readString();
        this.defaultType = in.readInt();
        this.statusId = in.readInt();
        this.statusName = in.readString();
        this.cardholderIdCard = in.readString();
        this.cardholderIdCardScale = in.readString();
        this.bankCardPhoto = in.readString();
        this.bankCardPhotoScale = in.readString();
        this.usageType = in.readInt();
        this.paymentType = in.readInt();
    }

    public static final Creator<BankCardInfo> CREATOR = new Creator<BankCardInfo>() {
        @Override
        public BankCardInfo createFromParcel(Parcel source) {
            return new BankCardInfo(source);
        }

        @Override
        public BankCardInfo[] newArray(int size) {
            return new BankCardInfo[size];
        }
    };
}
